#include <stdio.h>
#include <stdarg.h>
int vsnprintf()
SYNOPSIS
char * str size_t n const char * format va_list args
FUNCTION
Format a list of arguments and put them into the string str.
The function makes sure that no more than n characters (including
the terminal 0 byte) are written into str.
INPUTS
str
The formatted result is stored here
n
The size of str
format
A printf() format string.
args
A list of arguments for the format string.
RESULT
The number of characters written or -1 if the string was too small.
In this case, the string is not 0-terminated.
NOTES
No check is beeing made that str is large enough to contain
the result.